from django.contrib import admin
from .models import Usermsg
from .models import Article
from .models import Typemsg
from .models import Comment
# Register your models here.


class UsermsgAdmin(admin.ModelAdmin):
    list_display = ("name", "pwd", "email", "phone", "privilege", "sex", "articles", "visits")

class ArticleAdmin(admin.ModelAdmin):
    list_display = ('title', 'author', 'detail', 'content', 'uid', 'visits', 'comments')

class TypemsgAdmin(admin.ModelAdmin):
    list_display = ('typename', )

class CommentAdmin(admin.ModelAdmin):
    list_display = ('uid', 'content', 'aid')

admin.site.register(Usermsg, UsermsgAdmin)
admin.site.register(Article, ArticleAdmin)
admin.site.register(Typemsg, TypemsgAdmin)
admin.site.register(Comment, CommentAdmin)
